/*
import java.util.Random;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Random random = new Random();
        int randomNum = random.nextInt(100);
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.print("请输入你要猜的数字：");
            int num = scanner.nextInt();
            if (num > randomNum) {
                System.out.println("猜大了！");
            } else if (num == randomNum) {
                System.out.println("猜对了！");
                break;
            } else {
                System.out.println("猜小了");
            }
        }
        scanner.close();
    }
}*/

/*import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count =3;
        while (count != 0){
            System.out.print("请输入你的密码：");
            String password = scanner.nextLine();
            if(password.equals("123")){
                System.out.println("登录成功");
                break;
            }else {
                count--;
                System.out.println("你还有"+count+"次机会！");
            }
        }
    }
}*/

/*
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.printf("%d*%d=%d\t", j, i, i * j);
                //System.out.print(j + "*" + i + "=" + i*j + "\t");
            }
            System.out.println();
        }
    }
}*/

/*public class Test {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 10 == 9) {
                //System.out.println(i);
                count++;
            }
            if (i / 10 == 9) {
                //System.out.println(i);
                count++;
            }
        }
        System.out.println(count);
    }
}*/

/*import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 2;
        for (; i < n; i++) {
            if (n % i == 0) {
                System.out.println(n+"不是素数");
                break;
            }
        }
        if (i == n){
            System.out.println(n+"是素数");
        }
    }
}*/

/*import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int j = 1; j <= n; j++) {
            int i = 2;
            for (; i < j; i++) {
                if (j % i == 0) {
                    System.out.println(j+"不是素数");
                    break;
                }
            }
            if (i == j){
                System.out.println(j+"是素数");
            }
        }
    }
}*/

/*import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 2;
        for (; i <= n/2; i++) {
            if (n % i == 0) {
                System.out.println(n+"不是素数");
                break;
            }
        }
        if (n == 0 || n == 1){
            System.out.println(n+"不是素数");
        } else if (i > n/2) {
            System.out.println(n+"是素数");
        }
    }
}*/

/*
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 2;
        for (; i <= Math.sqrt(n); i++) {
            if (n % i == 0) {
                System.out.println(n+"不是素数");
                break;
            }
        }
        if (n == 0 || n == 1){
            System.out.println(n+"不是素数");
        } else if (i > Math.sqrt(n)) {
            System.out.println(n+"是素数");
        }
    }
}*/

/*public class Test {
    public static void main(String[] args) {
        int a = 18;
        int b = 24;
        int c = a % b;
        while (c != 0){
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println(b);
    }
}*/

/*public class Test {
    public static void main(String[] args) {
        double sum = 0;
        int flag = 1;
        for (int i = 1; i <=  100 ; i++) {
            sum += 1.0/i * flag;
            flag = -flag;
        }
        System.out.println(sum);
    }
}*/

/*import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    if (i == j || i+j+1 == n){
                        System.out.print("*");
                    }else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
        scanner.close();
    }
}*/

/*
public class Test {
    public static void main(String[] args) {
        for (int i = 0; i < 999999; i++) {
            //先计算有几位数，每次除以10
            int count = 0;
            //为了不让输入数字i发生变化，用tmp求位数
            int tmp = i;
            while (tmp != 0) {
                count++;
                tmp = tmp / 10;
            }
            //再求出i的每一位上的数字，i继续保持不变因此借用tmp，计算tmp上的每一位
            tmp = i;
            int sum = 0;
            while (tmp != 0) {
                sum += Math.pow(tmp % 10, count);
                tmp /= 10;
            }
            if (sum == i) {
                System.out.println(i);
            }
        }
    }
}*/

/*
public class Test {
    public static void main(String[] args) {
        int n = 6;
        int count = 0;
        while (n != 0){
            count++;
            n = n & (n-1);
        }
        System.out.println(count);
    }
}*/

public class Test {
    public static void main(String[] args) {
        int n = 7;
        for (int i = 31; i >= 0; i-=2) {
            System.out.print(((n >>> i) & 1)+" ");
        }
        System.out.println();
        for (int i = 30; i >= 0; i-=2) {
            System.out.print(((n >>> i) & 1)+" ");
        }
        System.out.println();
    }
}
